import memberApi from "@/api/declaration/mall/memberApi"
import httpRequest from "@/config/axios/httpRequest"
import { TagModel } from "@/models/mall/SignInConfigModel"

// 查询会员标签列表
export const getMemberTagPage = async (params: any) => {
  return await httpRequest.get(memberApi.GetMemberTagPage, { params })
}

// 查询会员标签详情
export const getMemberTag = async (id: number) => {
  return await httpRequest.get(memberApi.GetMemberTag, { params: { id } })
}

// 查询会员标签 - 精简信息列表
export const getSimpleTagList = async () => {
  return await httpRequest.get(memberApi.GetSimpleTagList)
}

// 新增会员标签
export const createMemberTag = async (data: TagModel) => {
  return await httpRequest.post(memberApi.CreateMemberTag, data)
}

// 修改会员标签
export const updateMemberTag = async (data: TagModel) => {
  return await httpRequest.put(memberApi.UpdateMemberTag, data)
}

// 删除会员标签
export const deleteMemberTag = async (id: number) => {
  return await httpRequest.delete(memberApi.DeleteMemberTag, { params: { id } })
}
